import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { FormControl } from '@angular/forms';

import { MatCheckboxChange } from '@angular/material/checkbox';

import { MaterialColorConfig } from '../../../configs/colors/material-color/material-color.config';

@Component({
    selector: 'op-checkbox',
    templateUrl: 'material-checkbox.component.html'
})
export class MaterialCheckboxComponent implements OnInit {
    @Input() labelTitle: string;
    @Input() name: string;
    @Input() color: string;
    @Input() reactiveFormControl: FormControl;

    constructor() { }

    ngOnInit(): void {
        this.initializeProperties();
    }

    protected initializeProperties(): void {
        this.color = this.color || MaterialColorConfig.blue;
    }
}